// 定义颜色和字体变量，方便统一管理和修改
@color-primary-text: #303133;
@color-regular-text: #606266;
@color-secondary-text: #909399;
@color-placeholder-text: #c0c4cc;

@color-theme: #19be6b;
@color-theme-dark: #18b566;
@color-danger: #f56c6c;
@color-warning: #f9ae3d;

@font-size-lg: 28rpx;
@font-size-md: 26rpx;
@font-size-sm: 24rpx;
@font-size-xs: 22rpx;

page {
  background-color: #f7f8fa;
}

.page-container {
  padding: 24rpx;
  min-height: 100vh;
  box-sizing: border-box;
  position: relative;
}

// 简单加载/空状态文本样式
.loading-text,
.empty-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: @color-secondary-text;
  font-size: @font-size-md;
}

.activity-card {
  background-color: #fff;
  border-radius: 16rpx;
  margin-bottom: 24rpx;
  padding: 30rpx;
  overflow: hidden; // 配合动画

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24rpx;

    .name {
      font-size: @font-size-lg;
      color: @color-primary-text;
      font-weight: bold;
    }
  }

  .card-body {
    font-size: @font-size-md;
    color: @color-regular-text;

    .info-row {
      display: flex;
      align-items: center;
      margin-bottom: 16rpx;

      &:last-child {
        margin-bottom: 0;
      }

      .info-icon {
        color: @color-secondary-text;
        margin-right: 12rpx;
        font-size: 30rpx;
      }
      .info-label {
        color: @color-secondary-text;
      }
    }
  }

  .details-toggle {
    margin-top: 24rpx;
    padding-top: 24rpx;
    border-top: 1rpx solid #ebedf0;
    font-size: @font-size-sm;
    color: @color-secondary-text;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rpx;
  }
  
  .details-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    font-size: @font-size-sm;
    color: @color-regular-text;
    
    &.expanded {
      max-height: 1000rpx; // 设置一个足够大的值
    }

    .detail-item {
      margin-top: 20rpx;
      .detail-label {
        color: @color-primary-text;
        font-weight: 500;
        margin-bottom: 8rpx;
      }
      .detail-content {
        line-height: 1.6;
        white-space: pre-wrap; // 保持文本格式
      }
    }
  }

  .card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 20rpx;
    margin-top: 30rpx;
    padding-top: 30rpx;
    border-top: 1rpx solid #ebedf0;

    // 定制 Vant Button 样式
    .van-button {
      --button-default-height: 56rpx;
      --button-small-font-size: @font-size-sm;
      &--primary {
        --button-primary-background-color: @color-theme;
        --button-primary-border-color: @color-theme;
        &.van-button--plain {
           color: @color-theme;
        }
      }
      &--danger {
        --button-danger-background-color: @color-danger;
        --button-danger-border-color: @color-danger;
        &.van-button--plain {
           color: @color-danger;
        }
      }
       &--warning {
        --button-warning-background-color: @color-warning;
        --button-warning-border-color: @color-warning;
         &.van-button--plain {
           color: @color-warning;
         }
      }
    }
  }
}

// Popup 弹窗内部样式
.popup-content {
  padding: 32rpx;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;

  .popup-title {
    font-size: @font-size-lg;
    color: @color-primary-text;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40rpx;
  }
  
  .van-cell-group--inset {
    margin: 0; // 重置van-cell-group的默认外边距
  }

  .popup-footer {
    margin-top: auto; // 将按钮推到底部
    padding-top: 30rpx;
    display: flex;
    gap: 24rpx;
    display: flex;
    justify-content: flex-end;

    .popup-btn {
      flex: 1;
      // 定制按钮样式
      --button-primary-background-color: @color-theme;
      --button-primary-border-color: @color-theme;
    }
  }
}
